<?php
/**
 * LazyFast Framework  This class just for test
 * ============================================================================
 * ©2008 Jeemon software
 * http://www.jeemon.com
 * ----------------------------------------------------------------------------
 * This is an open source project. You can modify and republish this project.
 * But don't be used for bussiness.
 * ============================================================================
 * $Author: Jeemon Wong <shadow.iqka@gmail.com>
 * $Date$
 * $Id$
 */

class CTest {
	
	function main( $x, $y) {
		
		$t1 = m("test", array($x=>$y) );
		
		$t2 = m("test");
		$t2->add("x", $x);
		$t2->add("y", $y);
		
		$t3 = m("test");
		
		CTest::navblock();
		v("test", "T1 Vars list - template is test/div:");
		v("test/div", $t1->get() );
		
		v("test", "T2 Vars List - template is test/li:");
		v("test/li", $t2->get() );
		
		v("test", "T3 Vars list: - template is test/pre");
		v("test/pre", $t3->get() );
	}
	
	function foo( $foo ) {
		$t = m('test');
		$t->add("foo", $foo);
		
		foreach($_REQUEST as $n=>$v) {
			$t->add($n, $v);
		}
		
		CTest::navblock();
		v("test", "Foo list:");
		v("test/li", $t->get());
	}
	
	function bar() {
		$t = m('test');
		foreach($_GET as $n=>$v) {
			$t->add($n, $v);
		}
		
		CTest::navblock();
		v("test", "bar list:");
		v("test/li", $t->get());
	}
	
	function navblock() {
		v('test/nav', array(
			"Main"=>"index.php?a=test&args[]=ia1&args[]=ia2",
			"Foo" =>"index.php?a=test&f=foo&args[]=FOO",
			"Bar" =>"index.php?a=test&&f=bar&args[]=BAR",
		));
	}
}